import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "./utils/rem.js";
import "./icons";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import "element-ui/lib/theme-chalk/icon.css"; // 引入图标样式
import Swiper from "r-swiper2";
import echarts from "echarts";

// 无论环境都引入，但内部会根据环境判断是否覆盖
import { overrideConsole } from "./utils/overrideConsole";
overrideConsole(); // 执行判断
Vue.prototype.$echarts = echarts;
window.echarts = echarts;

Vue.use(Swiper);
Vue.config.productionTip = false;
Vue.use(ElementUI);
// 创建全局事件总线
Vue.prototype.$bus = new Vue();
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
